#include <iostream>
#include <fstream>
#include <ctime>

using namespace std;

int main()
{
    int favn[11];
    double st;
    double ft;
    st = clock();
    cout<<st;
    ifstream f("m2_reverse.txt");
    if (f.is_open())
    {
        for (int p=0; p<11; p++)
        {
            f>>favn[p];
        }
    }
    else
    {
        cout << "file error" << endl;
    }
    for (int y=0; y<10; y++)
    {
        int k=0;
        for (int i=0; i<10; i++)
        {
            if (favn[i]>favn[i+1])
            {
                swap(favn[i], favn[i+1]);
                k++;
            }
        }
        if(k==0)
        {
            break;
        }
    }
    f.close();
    ft = clock()/1000;
    cout<<(ft-st)/1000.0<<endl;
    return 0;
}
